home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qbwinfnt.zip / EX_FSTST.BAS < prev    next >
BASIC Source File  |  1994-03-01  |  1KB  |  37 lines

  1.       REM:  EX_FSTST.BAS, Unregistered Version 1.0
  2.       REM:  Example of using FastString to display text.
  3.  
  4.       DECLARE SUB FastString (Text$, FClr%, X%, Y%, FontArray%())
  5.       DECLARE SUB LoadRsrcFileFont (FlName$, FontNum%, FontArray%(), RetCode%, RetMsg$)
  6.  
  7.       '...setup a VGA screen mode...
  8.       SCREEN 12
  9.  
  10.       '...set file name (change to match your system if necessary)...
  11.       FlName$ = "\windows\system\SSERIFF.FON"
  12.    
  13.       '...dim arrays for font data (use REDIM so they're DYNAMIC)...
  14.       REDIM Serif8pt%(1), Serif10pt%(1), Serif12pt%(1)
  15.      
  16.       PRINT : PRINT "Loading fonts from "; FlName$; "..."
  17.      
  18.       '...load the eight-point font (#1 in file)...
  19.       CALL LoadRsrcFileFont(FlName$, 1, Serif8pt%(), RetCode%, RetMsg$)
  20.       IF (RetCode% <> 0) THEN STOP
  21.      
  22.       '...load the ten-point font (#2 in file)...
  23.       CALL LoadRsrcFileFont(FlName$, 2, Serif10pt%(), RetCode%, RetMsg$)
  24.       IF (RetCode% <> 0) THEN STOP
  25.      
  26.       '...load the twelve-point font (#3 in file)...
  27.       CALL LoadRsrcFileFont(FlName$, 3, Serif12pt%(), RetCode%, RetMsg$)
  28.       IF (RetCode% <> 0) THEN STOP
  29.      
  30.       '...display a sample string in each font...
  31.       CALL FastString(" MS Sans Serif  8-point ", 2, 20, 70, Serif8pt%())
  32.       CALL FastString(" MS Sans Serif 10-point ", 2, 20, 90, Serif10pt%())
  33.       CALL FastString(" MS Sans Serif 12-point ", 2, 20, 116, Serif12pt%())
  34.      
  35.       END
  36.  
  37.